// React  路由懒加载 (不是很完美)

import Loadable from "react-loadable" 
import {Spin} from "antd"
function LoadingBox(){
    return (
        <div 
            style={{
                width:'100%',
                height:'100%',
                display:'flex',
                justifyContent:"center",
                alignItems:"center"
            }}
        >
            <Spin size="large" tip="加载中..." />
        </div>
    )
}

export default (lazyLoadComponent,loading=LoadingBox)=>Loadable({loader:lazyLoadComponent,loading})
